<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateLogTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('log', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('user')->default(0);
			$table->string('username')->default('')->index('log_username');
			$table->string('name')->default('')->index('log_name');
			$table->string('type')->default('')->index('log_type');
			$table->integer('action')->default(0)->index('log_action');
			$table->integer('project')->default(0);
			$table->string('datum')->default('')->index('log_datum');
			$table->timestamps();
			$table->softDeletes();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('log');
	}

}
